home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / modellib / malloc_aux_init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-16  |  1.9 KB  |  44 lines

  1. /*
  2. ### allocate memory dynamically after selecting or loading a new model ###
  3. */
  4.  
  5. #include <suntool/sunview.h>
  6. #include <suntool/canvas.h>
  7. #include <suntool/panel.h>
  8.  
  9. void malloc_aux_init()
  10. {
  11.     int *ivector(),**imatrix();
  12.     extern int batch_on,func_on,var_dim,full_dim,func_dim,param_dim,aux_max;
  13.     extern int *aux_on,*aux_win_mode,*aux_rescale,**aux_cur_index;
  14.     extern Frame *aux_frame;
  15.     extern Canvas *aux_canvas;
  16.     extern Cursor *aux_cursor;
  17.     extern Panel *aux_panel;
  18.     extern Pixwin **aux_pw;
  19.     extern Panel_item *aux_quit_item,*aux_copy_item,*aux_win_mode_item,*aux_x_item,*aux_y_item,*aux_x_min_item,*aux_x_max_item,*aux_y_min_item,*aux_y_max_item;
  20.  
  21.     aux_win_mode = ivector(0,aux_max-1);
  22.     aux_on = ivector(0,aux_max-1);
  23.     aux_rescale = ivector(0,aux_max-1);
  24.     aux_cur_index = imatrix(0,aux_max-1,0,1);
  25.     
  26.     if(!batch_on){
  27.         /* aux windows */
  28.         aux_frame = (Frame *) malloc((unsigned) sizeof(Frame) * aux_max);
  29.         aux_canvas = (Canvas *) malloc((unsigned) sizeof(Canvas) * aux_max);
  30.         aux_cursor = (Cursor *) malloc((unsigned) sizeof(Cursor) * aux_max);
  31.         aux_panel = (Panel *) malloc((unsigned) sizeof(Panel) * aux_max);
  32.         aux_pw = (Pixwin **) malloc((unsigned) sizeof(Pixwin *) * aux_max);
  33.         aux_quit_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  34.         aux_win_mode_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  35.         aux_copy_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  36.         aux_x_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  37.         aux_y_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  38.         aux_x_min_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  39.         aux_x_max_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  40.         aux_y_min_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  41.         aux_y_max_item = (Panel_item *) malloc((unsigned) sizeof(Panel_item) * aux_max);
  42.     }
  43. }
  44.